package com.shop.service;

import java.util.List;

import com.shop.bean.User;

/** 
 * @className: IUserService.java
 * @classDescription: 
 * @function: 
 * @author: Wentasy
 * @createTime: 2012-11-1 下午07:11:06
 * @modifyTime: 
 * @modifyReason: 
 * @since: JDK 1.6
 */
public interface IUserService {
	/**
	 * 新建用户
	 * 
	 * @param user
	 * @throws Exception
	 */
	public int createUser(User user) throws Exception;

	/**
	 * 更新用户
	 * 
	 * @param user
	 * @throws Exception
	 */
	public int updateOrder(User user) throws Exception;

	/**
	 * 根据Id删除用户
	 * 
	 * @param userId
	 * @throws Exception
	 */
	public int deleteUserById(long userId) throws Exception;

	/**
	 * 根据Id查询用户
	 * 
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public User queryUserById(long userId) throws Exception;
	
	/**
	 * 根据name查询用户
	 * @param name
	 * @return
	 * @throws Exception
	 */
    public User queryUserByName(String name) throws Exception;

	/**
	 * 查询所有的用户
	 * 
	 * @return
	 * @throws Exception
	 */
	public List<User> queryAllUser() throws Exception;
	
	/**
	 * 分页查询所有的用户
	 * @param pageSize
	 * @param pageNow
	 * @return
	 * @throws Exception
	 */
	public List<User> queryAllUser(int startPage,int pageSize) throws Exception;
}
